{template header}

<style type="text/css">
td{font-size: 12px;}
</style>

<h4 style="padding-left:10px;;">
    <span>搜索</span>
    <i class="icon-search"></i>

    <span style="float:right;font-size:14px;"><i class="icon-plus-sign"></i> <a href="?c=admin&a=groupUpdate">创建群组</a> &nbsp; </span>
</h4>
<form class="form-horizontal" method="post" action="">
    <div class="control-group search-group" style="margin:0;">
        <label class="control-label" >群ID：</label>
        <div class="controls">
          <input type="text" placeholder="群ID" name="groupId" value="{$search['groupId']}">
        </div>
    </div>
    <div class="control-group search-group" style="margin:0;">
        <label class="control-label" >群组名称：</label>
        <div class="controls">
          <input type="text" placeholder="群组名称" name="groupName" value="{$search['groupName']}">
        </div>
    </div>
    <div class="control-group search-group" style="margin:0;">
        <div class="controls">
            <input type="hidden" value="search" name="s">
            <button class="btn" type="submit">提交</button>
            <!-- <button class="btn" type="reset">重置</button> -->
        </div>
    </div>
</form>

<div class="bs-docs-example table-align pt-15" style="clear:both;">
    <table class="table table-striped">
        <thead>
            <tr>
                <th>ID</th>
                <th>LOGO</th>
                <th>群组名称</th>
                <th>口号</th>
                <th>创建时间</th>
                <th>创建人昵称</th>
                <th>成员数<a href="?c=admin&a=GroupList&sort=members&order=asc">升</a>|<a href="?c=admin&a=GroupList&sort=members&order=desc">降</a></th>
                <th>帖子数<a href="?c=admin&a=GroupList&sort=post&order=asc">升</a>|<a href="?c=admin&a=GroupList&sort=post&order=desc">降</a></th>
                <th>总跑量(km)<a href="?c=admin&a=GroupList&sort=mileage&order=asc">升</a>|<a href="?c=admin&a=GroupList&sort=mileage&order=desc">降</a></th>
                <th>群组状态<a href="?c=admin&a=GroupList&sort=isDismiss&order=asc">正常</a>|<a href="?c=admin&a=GroupList&sort=isDismiss&order=desc">解散</a></th>
                <th>活动数<a href="?c=admin&a=GroupList&sort=activity&order=asc">升</a>|<a href="?c=admin&a=GroupList&sort=activity&order=desc">降</a></th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {if !$list}  
                <tr>
                    <td>暂无记录</td>
                    <td></td>     
                    <td></td>    
                    <td></td>
                    <td></td>     
                    <td></td>    
                    <td></td>     
                    <td></td>    
                    <td></td>                 
                </tr>
            {else}

            {loop $list $k $v}
            <tr id="{$v['id']}">
                <td><a href="?c=admin&a=GroupStatistic&gid=$v['gid']">{$v['gid']}</td>
                <td><img width='30px' height='30px' src={if $v['header'] != ''}{$v['header']}
                    {else}static/bootstrap/img/jog_logo.png{/if} /></td>
                <td><a  href="?c=admin&a=GroupStatistic&gid=$v['gid']">{$v['name']}{if $v['province'] || $v['city']}</a><br /><code style="color:#666">{$v['province']}{$v['city']}</code>{/if}</td>
                <td><p class="w150">{$v['slogan']}</p></td>
                <td>{eval echo date('Y-m-d H:i:s', $v['addtime']);}</td>
                <td><a class="db w150" href="?c=admin&a=userinfo&uid={$v['uid']}">{$v['username']}</a></td>
                <td>{$v['members']}</td>
                <td>{$v['postNum']}</td>
                <td>{$v['total_mileage']}</td>
                <td>{if $v['isDismiss'] == 1}已解散{else}正常{/if}</td>
                <td>{$v['activityCount']}(官{$v['officeActivityCount']})</td>
                <td>
                    <a class="btn btn-edit" href="?c=admin&a=GroupStatistic&gid=$v['gid']">查看</a>
                    <a class="btn btn-edit" href="?c=admin&a=groupUpdate&gid=$v['gid']">修改</a>
                    <a class="btn btn-edit" href="?c=admin&a=postInfo&gid=$v['gid']">发帖</a>
                </td>
            </tr>
            {/loop}

            {/if}
        </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>
{template footer}
